package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.IncomeHierarchyEnum;
import com.sc.nft.enums.IncomeTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class IncomeDetailsVO {



    @ApiModelProperty("收益类型")
    private String incomeTypeName;

    @ApiModelProperty("来源用户")
    private String sourceUserName;

    @ApiModelProperty("金额")
    private String amount;

    @ApiModelProperty("时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public void setAmount(BigDecimal amount) {
        this.amount = amount.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }
}
